package com.atguigul.gulimall.auth.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 *   @GetMapping("/login.html")
 *     public String loginPage(){
 *         return "login";
 *     }
 *     @GetMapping("/reg.html")
 *     public String regPage(){
 *         return "reg";
 *     }
 */
@Configuration
public class GulimallWebConfig implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
//       registry.addViewController("/login.html").setViewName("login");登录页面要有自己的处理，不能直接去。
       registry.addViewController("/reg.html").setViewName("reg");
    }
}
